import Vue from 'vue';
import VueRouter from 'vue-router';
import Login from "@/views/Login";
import Layout from "@/views/Layout";
import Home from "@/views/Home";
import Setting from "@/views/Setting";
import UserManage from "@/views/UserManage";

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    // 三分屏
    path: '/tripleScreen',
    name: 'tripleScreen',
  },
  {
    // 双分屏
    path: '/doubleScreen',
    name: 'doubleScreen',
  },
  {
    path: '/',
    component: Layout,
    redirect: "/home",
    children: [
      {
        path: 'home',
        name: 'home',
        component: Home,
      },
      {
        path: 'code',
        name: 'code',
      },
      {
        path: 'task',
        name: 'task'
      },
      {
        path: 'job',
        name: 'job'
      },
      {
        path: 'setting',
        name: 'setting',
        component: Setting
      },
      {
        path: 'setting/user-manage',
        name: 'userManage',
        component:  UserManage
      }
    ],
  },
]

const router = new VueRouter({
  routes
})

export default router
